package org.study.plus.spring.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * 类的描述
 *
 * @author Administrator
 * @date 2021-05-25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("t_student")
public class Student implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 学号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 出生日期
     */
    private LocalDate birthday;

    /**
     * 性别：0-保密、1-男、2-女
     */
    private Integer sex;

    /**
     * 状态：0-禁用、1-正常
     */
    private Integer state;

    /**
     * 家庭地址
     */
    private String address;

    /**
     * 班级 id
     */
    @TableField(value = "class_id")
    private Integer classId;

    @TableField(value = "create_time", exist = false)
    private Date createTime;
}
